package cqut.wys.handler;

import com.lmax.disruptor.EventHandler;
import cqut.wys.event.SeckillEvent;

/**
 * --------神兽出没--------/
 *   ┌─┐     ┌─┐
 * ┌─┘─┴─────┘─┴─┐
 * │      ─      │
 * │  ┬─┘   └─┬  │
 * │             │
 * │      ┴      │  Code is far away from bug with the animal protecting
 * └───┐      ┌──┘  神兽保佑,代码无bug
 *     │      │
 *     │      └──────┐
 *     │             ├┐
 *     │             ┌┘
 *     └┐ ┐ ┌───┬─┐ ┌┘
 *      │ ┤ ┤   │ ┤ ┤
 *      └─┴─┘   └─┴─┘
 * --------感觉萌萌哒--------/
 *
 * 消费者
 *
 * @author wys
 * @date 2019/6/17.
 */
public class SeckillEventConsumer implements EventHandler<SeckillEvent> {
    @Override
    public void onEvent(SeckillEvent seckillEvent, long seq, boolean endOfBatch) throws Exception {
        System.out.println("消费者:" + seckillEvent.getUserId() + ",id=" + seckillEvent.getSeckillId());
    }
}
